1. Field of the Invention
The present invention relates to a PCM data outputting method and a PCM data output device and, more particularly, to a PCM data outputting method and a PCM data output device enabling output of PCM group information and PCM data correctly correlated with each other.
2. Description of the Related Art
In a storage-type medium such as DVD (Digital Video Disc) and a communication-type medium such as STB (Set Top Box), voice information is transmitted together with image. It is a common practice for voice data to be compressed as is representatively done in MPEG for the purpose of reducing storage and communication capacities. Compression, however, inevitably causes quantizing noise because of the principle of voice compression and in media giving importance to tone quality, therefore, non-compressed PCM voice is employed.
Since in a compressed stream in MPEG or the like, information including a sampling frequency is recorded, extracting and processing the information at a decoding block enables proper PCM data to be decoded. On the other hand, in the transmission of PCM data, since PCM data in itself has none of information including a sampling frequency, the information is added to each transmission packet. It is crucial to correctly correlate PCM information recorded in a transmission packet and PCM data itself.
An example of a conventional PCM data output device is shown in FIG. 6. In this PCM data output device, a packet synchronization unit 110 provides packet synchronization of applied PCM packets to output PCM data grouped into a plurality of data to a buffer control unit 120 and the output plurality of PCM data is written into a PCM buffer 140 by the buffer control unit 120. In addition, a PCM data processing unit 150 reads and externally outputs data written in the PCM buffer 140 based on PCM group information applied from the packet synchronization unit 110.
In the PCM data output device illustrated in FIG. 6, since correlation between PCM group information (sampling frequency and bit length) output from the packet synchronization unit 110 and PCM data written to the buffer control unit 120 and read from the PCM buffer 140 involves a discrepancy, there exists a period when the PCM data processing unit 150 fails to accurately provide PCM output.
Another example of conventional art is a technique disclosed in Japanese Patent Laying-Open No. 5-282785. The system disclosed in Japanese Patent Laying-Open No. 5-282785 limits its application only to reproduction of CD (Compact Disc) to adjust a time base of a PCM data part with reference to a sub-code at the head of each frame. Since this system specializes on CD to have other information than time (the number of quantizing bits, sampling frequency, etc.) as fixed values, it fails to follow PCM data for which these information is variable and accordingly disables PCM group information and PCM data to be correctly correlated with each other.
An object of the present invention is to provide a PCM data outputting method and a PCM data output device enabling PCM group information and PCM data to be correctly correlated with each other at any time to accurately provide PCM output.
According to the first aspect of the invention, a PCM data outputting method of receiving input of a data stream of PCM packets to output PCM data, comprising the steps of
receiving input of a PCM data stream made up of a plurality of packets in which PCM groups each composed of a plurality of PCM data follow one after another and in which a header of a packet to which PCM data at the head of each PCM group belongs contains PCM group information of the PCM group in question and providing packet synchronization with respect to the PCM data stream to output PCM data by a predetermined number of the plurality of data, as well as outputting PCM group information from the header,
writing the PCM data into a PCM buffer,
generating an address in the PCM buffer at which PCM data at the head of the PCM group is written, and
based on the address, reading PCM data from the PCM buffer and externally outputting the data together with the PCM group information.
In the preferred construction, the PCM data outputting method further comprising the steps of
when PCM data at the head of the PCM group is included in a predetermined number of PCM data to be written into the PCM buffer, outputting position information indicative of a position of the PCM data at the head in the predetermined number of PCM data, and
recognizing the PCM data at the head from the position information.
In another preferred construction, the PCM data outputting method further comprising the steps of
when PCM data at the head of the PCM group is included in a predetermined number of PCM data to be written into the PCM buffer, outputting an existence signal indicative of the existence of the PCM data at the head and position information indicative of a position of the PCM data at the head in the predetermined number of PCM data at the same timing as that of the output of the predetermined number of PCM data in question, and
when the existence signal is output, recognizing the PCM data at the head from the then the position information.
In another preferred construction, the PCM data outputting method further comprising the steps of
receiving input of the PCM data stream and at the same timing as that of packet synchronization, determining whether the PCM group information is contained in the header, and
determining whether PCM data at the head of the PCM group is included in a predetermined number of PCM data to be written into the PCM buffer.
In another preferred construction, the PCM data outputting method further comprising the steps of
receiving input of the PCM data stream and at the same timing as that of packet synchronization, determining whether the PCM group information is contained in the header,
determining whether PCM data at the head of the PCM group is included in a predetermined number of PCM data to be written into the PCM buffer,
when PCM data at the head of the PCM group is included in a predetermined number of PCM data to be written into the PCM buffer, outputting an existence signal indicative of the existence of the PCM data at the head and position information indicative of a position of the PCM data at the head in the predetermined number of PCM data at the same timing as that of the output of the predetermined number of PCM data in question, and
when the existence signal is output, recognizing the PCM data at the head from the then the position information.
According to the second aspect of the invention, a PCM data output device which receives input of a data stream of PCM packets to output PCM data, comprises
packet synchronization means for receiving input of a PCM data stream made up of a plurality of packets in which PCM groups each composed of a plurality of PCM data follow one after another and in which a header of a packet to which PCM data at the head of each PCM group belongs contains PCM group information of the PCM group in question and providing packet synchronization with respect to the PCM data stream to output PCM data by a predetermined number of the plurality of data, as well as outputting, from a header containing PCM group information, the PCM group information,
buffer control means for sequentially writing PCM data output from the packet synchronization means into the PCM buffer and generating an address in the PCM buffer at which PCM data at the head of the PCM group is written, and
PCM data processing means for reading PCM data from the PCM buffer based on the address and externally outputting the data together with the PCM group information.
In the preferred construction, the packet synchronization means,
when PCM data at the head of the PCM group is included in a predetermined number of PCM data, outputs position information indicative of a position of the PCM data at the head in the predetermined number of PCM data at the same timing as that of the output of the predetermined number of PCM data in question,
the buffer control means recognizes the PCM data at the head from the position information output from the packet synchronization means and generating an address of the PCM buffer at which the PCM data at the head is written in the PCM buffer, and
based on PCM group information output from the packet synchronization means, the PCM data processing means reads the PCM data of the PCM group from the PCM buffer according to the address.
In another preferred construction, the PCM data output device further comprises
address storage means for storing the address, wherein
the buffer control means stores, in the address storage means, an address of the PCM buffer at which PCM data at the head is written in the PCM buffer in correlation with the PCM group as head address information, and
the PCM data processing means obtains, based on PCM group information output from the packet synchronization means, the corresponding head address information from the address storage means and reads the PCM data from the PCM buffer according to the address.
In another preferred construction, the packet synchronization means,
when PCM data at the head of a PCM group is included in a predetermined number of PCM data, outputs an existence signal indicative of the existence of the PCM data at the head and position information indicative of a position of the PCM data at the head in the predetermined number of PCM data at the same timing as that of the output of the predetermined number of PCM data in question,
the buffer control means,
when the existence signal is output, recognizes the PCM data at the head from the then the position information and generates an address of the PCM buffer at which the PCM data at the head is written in the PCM buffer, and
based on PCM group information output from the packet synchronization means, the PCM data processing means reads the PCM data of the PCM group from the PCM buffer according to the address.
In another preferred construction, the PCM data output device further comprises
address storage means for storing the address, wherein
the packet synchronization means,
when PCM data at the head of a PCM group is included in a predetermined number of PCM data, outputs an existence signal indicative of the existence of the PCM data at the head and position information indicative of a position of the PCM data at the head in the predetermined number of PCM data at the same timing as that of the output of the predetermined number of PCM data in question,
the buffer control means, when the existence signal is output, recognizes the PCM data at the head from the then the position information, generates an address of the PCM buffer at which the PCM data at the head is written in the PCM buffer and stores, in the address storage means, the address in correlation with
the PCM group as head address information, and the PCM data processing means obtains, based on PCM group information output from the packet synchronization means, the corresponding head address information from the address storage means and reads the PCM data from the PCM buffer according to the address.
According to another aspect of the invention, a computer readable memory which stores a PCM data output program for receiving input of a data stream of PCM packets to output PCM data, the PCM data output program comprising the steps of
receiving input of a PCM data stream made up of a plurality of packets in which PCM groups each composed of a plurality of PCM data follow one after another and in which a header of a packet to which PCM data at the head of each PCM group belongs contains PCM group information of the PCM group in question and providing packet synchronization with respect to the PCM data stream to output PCM data by a predetermined number of the plurality of data, as well as outputting PCM group information from the header,
writing the PCM data into a PCM buffer,
generating an address in the PCM buffer at which PCM data at the head of the PCM group is written, and based on the group head address, reading PCM data from the PCM buffer and externally outputting the data together with the PCM group information.
Other objects, features and advantages of the present invention will become clear from the detailed description given herebelow.